const Controller = require('egg').Controller

class CategoryController extends Controller {
  async updateCategory() {
    const { ctx } = this
    const count = await ctx.service.crawler.courseCategory.index()
    if (count >= 0) {
      return ctx.renderBack({ count }, '1', '更新成功')
    }
  }
}

module.exports = CategoryController
